package com.zhxt.system.service.impl;

import com.zhxt.system.domain.ZhxtContribute;
import com.zhxt.system.mapper.ZhxtContributeMapper;
import com.zhxt.system.service.IZhxtContributeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class ZhxtContributeServiceImpl implements IZhxtContributeService {

    @Autowired
    private ZhxtContributeMapper zhxtContributeMapper;

    /**
     * 查询凌烟阁内容列表
     */
    public List<ZhxtContribute> getZhxtContributeList(ZhxtContribute zhxtContribute){
        List<ZhxtContribute> zhxtContributeList = zhxtContributeMapper.getZhxtContributeList(zhxtContribute);
        return zhxtContributeList==null?new ArrayList<>():zhxtContributeList;
    }

    /**
     * 新增凌烟阁
     */
    public int addContribute(ZhxtContribute zhxtContribute){
        return zhxtContributeMapper.addContribute(zhxtContribute);
    }

    /**
     * 修改凌烟阁
     */
    public int updateContribute(ZhxtContribute zhxtContribute){
        return zhxtContributeMapper.updateContribute(zhxtContribute);
    }

    /**
     * 删除凌烟阁
     */
    public int delContribute(ZhxtContribute zhxtContribute){
        return zhxtContributeMapper.delContribute(zhxtContribute);
    }
}
